//
//  UIView+UPView.m
//  LoveFreshBee
//
//  Created by wyzc on 16/6/13.
//  Copyright © 2016年 叶落知秋. All rights reserved.
//

#import "UIView+UPView.h"

@implementation UIView (UPView)

-(void)setX:(int)x
{
    CGRect rect=self.frame;
    
    rect.origin.x=x;
    
    self.frame=rect;
}
-(void)setY:(int)y
{
    CGRect rect=self.frame;
    
    rect.origin.y=y;
    
    self.frame=rect;
}


-(int)x
{
    return self.frame.origin.x;
}
-(int)y
{
    return self.frame.origin.y;
}
-(int)height

{
    return self.frame.size.height;
}

-(void)setHeight:(int)height
{
    CGRect rect=self.frame;
    rect.size.height=height;
    self.frame=rect;
}

-(int)width
{
    return self.frame.size.width;
}

-(void)setWidth:(int)width
{
    CGRect rect=self.frame;
    rect.size.width=width;
    self.frame=rect;
}
@end
